home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Demos / Codeworks 0.94b3 / Codeworks® WWW Demo Doc. / Getting Started with Codeworks < prev    next >
Encoding:
Text File  |  1995-12-07  |  7.0 KB  |  163 lines  |  [ttro/ttxt]

  1. Welcome to Codeworks!
  2.  
  3. Glyphic Codeworks is a small (but powerful) object-oriented dynamic 
  4. development environment.  Codeworks runs in less than 2 MB of memory, 
  5. and the application and necessary libraries fill less than 1 MB of disk space.
  6.  
  7. In this document, which is meant to get you started with Codeworks, we
  8. provide:
  9.  
  10.    • the history of Codeworks, and the reason that this version of Codeworks 
  11.      is a demo version;
  12.  
  13.    • a brief tutorial introduction to Codeworks; and
  14.  
  15.    • a recommended path to take through our document set.
  16.  
  17.  
  18.  
  19. Codeworks History, and Where It's Going
  20.  
  21. Codeworks was created in 1993 by Glyphic Technology out of a desire to create
  22. a new, small, development environment that was both easy to use and based on
  23. sound language design principles. The first commercial version of Codeworks
  24. was produced for EO to run on Go's PenPoint operating system. Since then, it
  25. has been substantially reengineered to be a cross-platform, platform-
  26. independent system. It now runs on Macintosh; a Windows version will be
  27. available shortly.
  28.  
  29. Codeworks is a prototype-based object-oriented system. In a prototype-based
  30. system, there is no difference in a class and an object. A class is created
  31. by creating a usable object; this object can be used directly, or copied to
  32. make other instances of the same class. The instance variables and methods
  33. of these copies can be changed or added to, which allows easy subclassing.
  34.  
  35. This version of Codeworks is a demo version. A more complete version is
  36. planned for February, and a commercial version will be available sometime in
  37. mid-1996. This version is called a "demo" because it isn't quite what we'd
  38. like it to be yet. The first non-demo version will have (among other
  39. things):
  40.  
  41.    • more standard keyboard controls. For example, on the Macintosh,
  42.      command-a usually activates a select all in a text window. This demo
  43.      version of Codeworks doesn't support select all and certain other
  44.      standard commands.
  45.  
  46.    • better documentation. These documents were adapted directly from the
  47.      PenPoint version of Codeworks; some of these original documents are
  48.      flawed, some are missing, and new tutorials need to be developed.
  49.  
  50.  
  51. A Brief Codeworks Tutorial
  52.  
  53. This extremely short tutorial is meant to cover some of the gaps in the
  54. current document set. In it, you will look at a small Codeworks program, and
  55. learn some of the commands and keys that Codeworks uses. Steps to follow
  56. along with are presented in a plain-text font, and general points about
  57. Codeworks are bulleted and indented.
  58.  
  59. This tutorial assumes that you have at least some background in
  60. object-oriented programming. If you don't, you can still do the tutorial,
  61. but some of the terms and ideas may be puzzling until you've gone through
  62. the longer Codeworks manuals.
  63.  
  64. Open the Codeworks folder. You'll find the Codeworks program, and a number
  65. of other folders/files as well. Open the Codeworks Samples folder and
  66. double-click on the Spaceship document.
  67.  
  68. You'll find yourself staring at a window called Spaceship. This is the
  69. default view of a spaceship object. This spaceship object has a number of
  70. instance variables, including size, direction, and x and y location.
  71.  
  72. Click on the rotate-r button. The spaceship's direction changes. The
  73. rotate-r, rotate-l, reset, forward, and back buttons all change the instance
  74. variables of the spaceship. To read the scripts of these buttons, press the
  75. escape key and then double-click on the button of interest.
  76.  
  77.    • To toggle between User and Author modes for any Codeworks window,
  78.      press the escape key.
  79.  
  80. Here's another way of getting to the script of any particular button: switch
  81. into author mode (by pressing the escape key), and click on a button while
  82. holding the command key down. Choose Open... from the resulting pop-up menu,
  83. and choose script-browser-view from the second pop-up.
  84.  
  85.    • Every item on the screen has a number of options that can be
  86.      changed. Command-click on any object to see a list of options, and
  87.      to edit these options.
  88.  
  89. Switch back to user mode, using the escape key. Press the run-program
  90. button. The long string in the field above this button is a program for the
  91. spaceship: "f" means forward, "b" is back, "r" is right, and "l" is left. The
  92. instance variables of the spaceship change according to the program
  93. instructions.
  94.  
  95. Press the show-window button, and then the reset button. A second view of
  96. the same object appears. Press the run-program button, and as the values of
  97. the instance variables change, the spaceship picture will change as well.
  98. Same object, different view.
  99.  
  100. To see the list of views for the spaceship, command-click in the titlebar of
  101. either of the two spaceship windows. Choose Options... from the resulting
  102. popup, and then choose View Management. Views can be displayed, added,
  103. changed, or deleted from here.
  104.  
  105.    • Command-click on a titlebar to get a list of editable options for
  106.      that class.
  107.  
  108.    • To add a view to an existing class, open the titlebar options,
  109.      then choose Options... followed by View Management.
  110.  
  111. The spaceship is drawn in the second window via a script called draw for the
  112. window's view. To see this script, command-click in the titlebar of that
  113. window, and choose Edit Draw Script.
  114.  
  115.    • Drawable views are drawn according to the code of the draw script
  116.      for that view's window. To edit the draw script for a drawable
  117.      view, command-click in the window's titlebar, and choose Edit Draw
  118.      Script.
  119.  
  120. This should be enough to get you started. Here are a few other hints:
  121.  
  122.    • Every object can be viewed via a slot browser by command-clicking
  123.      on the object's window titlebar while in author mode, and then
  124.      choosing Open Browser from the resulting popup menu.
  125.  
  126.    • The text format of Codeworks scripts contain syntactical
  127.      information. Words in bold are messages; words in plaintext are
  128.      operators or objects; and italicized text represents comments.
  129.      Crossed-out text represents code that is not currently in use.
  130.  
  131.    • To make a word bold while typing, simply hold down the shift key
  132.      as you type the first character of the word.
  133.  
  134.    • All Codeworks windows can be resized by dragging from the lower
  135.      right-hand corner, even though there is no resize box.
  136.  
  137.    • To interrupt a running program, type command-escape.
  138.  
  139.    • To set a breakpoint in the code, preface the statement with a
  140.      pound sign (#).
  141.  
  142.  
  143. A Recommended Path Through the Document Set
  144.  
  145. From here, it is best to move on to the Codeworks Tutorial, and continue
  146. with the Scripting Manual. The tutorial is well-written and well-explained,
  147. but the example that was chosen does not show off Codeworks at its best. We
  148. realize this, and are in the process of rewriting the tutorial (and all of
  149. our other documents) for the next version.
  150.  
  151. If you have questions or comments about Codeworks, please contact us! 
  152.  
  153.    • You can write to us at frontdesk@glyphic.com .
  154.  
  155.    • Keep up with Codeworks via our Web site:  http://www.glyphic.com/
  156.  
  157.    • If you'd like to join our mailing list, please see 
  158.  
  159.              http://www.glyphic.com/glyphic/request.html
  160.  
  161.        or send us email at  codeworks-users-request@glyphic.com  .
  162.  
  163.